package com.inspinia.base.common.model;

/**
 * Created by ASUS on 2017/3/7.
 */
public enum RolesEnum implements NameCodeEnum {
    judgeRoomLeader(1, "研判领导"),
    judger(2, "研判民警"),
    provinceCenter(3, "省厅"),
    countyBureauPolicer(4, "分县局民警"),
    alarmPolice(5, "接警民警"),
    provinceJudgedLeader(6, "省厅研判领导"),
    provinceJudger(7, "研判领导"),
    cfgcenterManager(8, "配置中心管理员"),
    vosImport(9, "vos数据导入员"),
    vosInterfaceManager(10, "接口管理员"),
    eplatAdmin(11,"E平台管理员"),
    admin(12,"超级管理员"),
    vosExport(13,"vos数据导出员"),
    logManagement(14,"日志管理"),
    charge(14,"计费功能管理员"),
    warningInfoOperator(16,"预警信息操作员");

    private final int code;
    private final String name;

    RolesEnum(int code , String name){
        this.code=code;
        this.name=name;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getName() {
        return name;
    }

    public RolesEnum getValue(int code){
        for(RolesEnum rolesEnum:RolesEnum.values()){
            if(rolesEnum.getCode()==code){
                return rolesEnum;
            }
        }
        return null;
    }
}
